<?php if (!defined('SERVER_ROOT')) { exit('No direct script access allowed');}
$this->template->title = 'Hệ thống một cửa điện tử UBND huyện Chợ Gạo';
$v_pop_win = isset($_REQUEST['pop_win']) ? '_pop_win' : '';
$this->template->display('dsp_header' . $v_pop_win . '.php');
//------------------------------------------------------------------------------
?>
<form name="frmMain" method="post" id="frmMain" action="" enctype="multipart/form-data">
   <?php
    echo $this->hidden('controller', $this->get_controller_url());
    echo $this->hidden('hdn_item_id', $var_macanbo);
    //echo $this->hidden('hdn_deleted_file_id_list', '');
    ?>        
    <h5 style="text-align: center">Cập nhật nghĩ hưu <?php echo $var_tencanbo; ?></h5>
    <div class="Row">
        <div class="left-Col">Ngày nghĩ hưu: <label class="required">(*)</label> </div>
        <div class="right-Col">
           <input  type="text" name="txt_NGAY_NGHI_HUU" id="txt_NGAY_NGHI_HUU" value="<?php echo $NGAY_SINH;?>"
                   class="inputbox" maxlength="255" style="width:70%"
                   onKeyDown="return handleEnter(this, event);"
                   data-validate="text"
                    readonly="readonly"
                   data-name="ngày sinh"
                   data-xml="no" data-doc="no"
              />
              <img class="btndate" style="cursor:pointer;margin-top: -30px;" id="btnDate" src="<?php echo SITE_ROOT?>public/images/calendar.gif" onclick="DoCal('txt_NGAY_NGHI_HUU')" />
        </div>
    </div>  <br />
    <div class="button-area">
        <input type="button" name="update" class = 'button save' value="Lưu" onclick="dongynghihuu_onclick();"/>
        <?php $v_back_action = ($v_pop_win === '') ? 'btn_back_onclick();' : 'try{window.parent.hidePopWin();}catch(e){window.close();};';?>
        <input type="button" name="cancel" class = 'button close' value="Bỏ qua" onclick="<?php echo $v_back_action;?>"/>
    </div>
</form>
<script>

    function dongynghihuu_onclick(){
       var f = document.frmMain;
        m = $("#controller").val() + 'capnhat_nghihuu';
        var xObj = new DynamicFormHelper('','',f);
        if (xObj.ValidateForm(f)){
            $("#frmMain").attr("action", m);
            f.submit();
        }
    }
</script>

<?php $this->template->display('dsp_footer' .$v_pop_win . '.php');